package com.chencs.app.lianmeng.controller;

import com.alibaba.fastjson.JSON;
import com.chencs.app.lianmeng.service.LMSearchSer;
import com.chencs.vo.net.lmrequest.LmKeyRequest;
import com.chencs.vo.net.lmresponse.LmKeyResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018-8-9.
 */
@RestController
@RequestMapping("/app/lmSearch")
public class LMSearchCtr {


    @Autowired
    private LMSearchSer lmSearchSer;


    @RequestMapping(value = "/keyList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
    public  String getKey(@RequestBody LmKeyRequest request){
        LmKeyResponse response = lmSearchSer.getKeys(request);
        return JSON.toJSONString(response);
    }


}
